package a.f.d.a;

import a.c.e;
import a.c.k;
import a.c.m;
import a.c.n;
import a.c.v;
import a.d.w;
import a.f.fd;
import a.f.kc;
import a.f.o;
import a.f.zb;
import a.i.sb;

import java.util.*;

class cd
{
  private static final double a = 0.001D;
  private static final double b = Math.sqrt(2.0D);
  private a.c.z c;
  private a.c.z d;
  private Map e;
  private Map f;
  private ic g;
  
  ic a()
  {
    return this.g;
  }
  
  void a(ic paramic)
  {
    this.g = paramic;
  }
  
  public void a(o paramo, ac paramac, bc parambc, rb paramrb, n paramn, sb paramsb)
  {
    boolean bool3 = d.R;
    boolean bool2 = d.Q;
    k localk1 = paramo.c(d.N);
    Object localObject1 = (bool3) || (localk1 != null) ? (hb)localk1.get(paramo) : null;
    int i = (localObject1.a()) && (this.g != null) ? 1 : 0;
    k localk2 = paramo.c(a.f.oc.a);
    this.e = new HashMap();
    this.f = new HashMap();
    ArrayList localArrayList1 = new ArrayList(255);
    HashSet localHashSet = new HashSet();
    this.c = new a.c.z();
    this.d = new a.c.z();
    HashMap localHashMap1 = new HashMap();
    HashMap localHashMap2 = new HashMap();
    HashMap localHashMap3 = new HashMap();
    ArrayList localArrayList2 = new ArrayList(255);
    ArrayList localArrayList3 = new ArrayList();
    ArrayList localArrayList4 = new ArrayList();
    ArrayList localArrayList5 = new ArrayList();
    ArrayList localArrayList6 = new ArrayList();
    int j = 0;
    label321:
    label344:
    label484:
    label612:
    label617:
    label624:
    label756:
    label1405:
    label1407:
    do
    {
      if (j >= paramac.a() - 1) {
        break;
      }
      break label1819;
      break label344;
      vb localvb1 = paramac.a(j);
      vb localvb2 = paramac.a(j + 1);
      localHashMap3.clear();
      if (!bool3)
      {
        if (bool2) {
          break label3704;
        }
        localArrayList2.clear();
      }
      Object localObject2 = localvb1.c().f();
      Object localObject3;
      Object localObject4;
      c_ localc_1;
      do
      {
        if (localObject2 == null) {
          break label484;
        }
        e locale1 = (e)((v)localObject2).c();
        if (bool3) {
          break label1793;
        }
        if (bool2) {
          break label1791;
        }
        localObject3 = locale1.h();
        do
        {
          if (localObject3 == null) {
            break label467;
          }
          if (bool2) {
            break;
          }
          if (parambc.a(((a.c.d)localObject3).f()).h() > localvb1.e())
          {
            localObject4 = parambc.a((a.c.d)localObject3).h();
            if (bool3) {
              continue;
            }
            if (localObject4 != null)
            {
              localc_1 = (c_)localHashMap3.get(localObject4);
              if (!bool3) {
                if (localc_1 == null)
                {
                  localc_1 = new c_(localObject4);
                  localHashMap3.put(localObject4, localc_1);
                  localArrayList2.add(localc_1);
                }
              }
              localc_1.b.add(localObject3);
            }
          }
          localObject3 = ((a.c.d)localObject3).i();
        } while (!bool2);
        localObject2 = ((v)localObject2).a();
        if (bool3) {
          break;
        }
      } while (!bool2);
      Object localObject5;
      Object localObject6;
      Object localObject7;
      Object localObject8;
      Object localObject9;
      Object localObject10;
      boolean bool1;
      e locale3;
      Object localObject11;
      Object localObject12;
      do
      {
        if (bool3) {
          break label3709;
        }
        if (localHashMap3.size() > 0)
        {
          j++;
          localObject2 = paramac.a((byte)2, j);
          if (bool3) {
            break label3694;
          }
          int m = localArrayList2.size() - 1;
          do
          {
            do
            {
              if (m < 0) {
                break label1745;
              }
              localObject3 = (c_)localArrayList2.get(m);
              this.c.add(localObject3);
              localObject4 = paramrb.a((vb)localObject2, ((c_)localObject3).a);
              ((c_)localObject3).d = ((e)localObject4);
              this.e.put(localObject4, localObject3);
              if (bool3) {
                break label2077;
              }
              localc_1 = (c_)localHashMap1.get(((c_)localObject3).a);
              if (bool2) {
                break label2089;
              }
              if (bool3) {
                break label2125;
              }
              if (localc_1 == null) {
                break label756;
              }
              if (bool3) {
                break;
              }
            } while (bool3);
            do
            {
              localObject5 = localc_1.c.isEmpty() ? null : (a.c.d)localc_1.c.iterator().next();
              localObject6 = paramrb.a(localc_1.d, (e)localObject4, (a.c.d)localObject5);
              localc_1.e = (((c_)localObject3).f = localObject6);
              ((c_)localObject3).g = localc_1;
              localc_1.i = ((c_)localObject3);
              ((c_)localObject3).c.addAll(localc_1.c);
              localc_1.c.clear();
              localc_1.c = null;
              localObject5 = null;
              localObject6 = null;
              localObject7 = null;
              localObject8 = null;
              localObject9 = null;
              localArrayList3.clear();
              v localv1 = ((c_)localObject3).b.f();
              do
              {
                if (localv1 == null) {
                  break;
                }
                localObject10 = (a.c.d)localv1.c();
                bool1 = parambc.a((a.c.d)localObject10).k();
                localArrayList6.clear();
                locale3 = ((a.c.d)localObject10).e();
                if (bool2) {
                  break label2082;
                }
                if ((localObject9 == null) || (locale3 != ((a.c.d)localObject9).e()))
                {
                  if (!bool3)
                  {
                    if (localArrayList3.size() > 0)
                    {
                      if (bool3) {
                        break label925;
                      }
                      if (localObject9 != null)
                      {
                        paramn.a(localObject9, localArrayList3.toArray(new kc[localArrayList3.size()]));
                        localArrayList3.clear();
                      }
                    }
                    localObject9 = paramrb.a(locale3, (e)localObject4, (a.c.d)localObject10, true, false);
                  }
                  if (i != 0)
                  {
                    localObject11 = parambc.a(locale3);
                    if ((bool3) || (localObject11 != null))
                    {
                      vc localvc1 = ((ec)localObject11).n();
                      if ((bool3) || (localvc1 != null))
                      {
                        int i5 = localvc1.j();
                        if (!bool3) {
                          if (localObject5 != null)
                          {
                            if (bool3) {
                              break label1009;
                            }
                            if (((vc)localObject5).j() <= i5) {
                              break label1007;
                            }
                          }
                        }
                        localObject5 = localvc1;
                        if ((bool3) || ((localObject6 == null) || ((bool3) || (((vc)localObject6).j() < i5)))) {
                          localObject6 = localvc1;
                        }
                      }
                    }
                  }
                }
                if (!bool3) {
                  if (paramn != null)
                  {
                    localObject11 = (kc[])paramsb.get(localObject10);
                    if (bool3) {
                      break label1215;
                    }
                    if (localObject11 != null)
                    {
                      if (bool3) {
                        break label1215;
                      }
                      if (localObject11.length > 0)
                      {
                        int i3 = localObject11.length - 1;
                        do
                        {
                          if (i3 < 0) {
                            break;
                          }
                          if (bool2) {
                            break label1316;
                          }
                          if (!bool1)
                          {
                            if (bool3) {
                              break label1164;
                            }
                            if (localObject11[i3].g().j()) {}
                          }
                          else
                          {
                            if (bool3) {
                              break label1184;
                            }
                            if (!bool1) {
                              break label1172;
                            }
                            if (bool3) {
                              break label1184;
                            }
                            if (!localObject11[i3].g().l()) {
                              break label1172;
                            }
                          }
                          localArrayList3.add(localObject11[i3]);
                          if (!bool3)
                          {
                            if (bool2) {
                              localArrayList6.add(localObject11[i3]);
                            }
                            i3--;
                          }
                        } while (!bool2);
                      }
                    }
                  }
                }
                localObject11 = parambc.a((a.c.d)localObject10).i();
                if (bool3) {
                  break label2069;
                }
                if (localObject11 == null)
                {
                  localObject12 = paramrb.a((e)localObject4, ((a.c.d)localObject10).f(), (a.c.d)localObject10, false, true);
                  ((c_)localObject3).j.put(localObject10, localObject12);
                  if (bool3) {
                    break label1319;
                  }
                  if (localArrayList6.size() > 0)
                  {
                    paramn.a(localObject12, localArrayList6.toArray(new kc[localArrayList6.size()]));
                    if (bool3) {
                      break label1319;
                    }
                    if (!bool2) {}
                  }
                }
                else
                {
                  ((c_)localObject3).c.add(localObject10);
                }
                if (!bool3) {
                  if (i != 0)
                  {
                    localObject12 = parambc.a(((a.c.d)localObject10).f());
                    if ((bool3) || (localObject12 != null))
                    {
                      vc localvc2 = ((ec)localObject12).n();
                      if ((bool3) || (localvc2 != null))
                      {
                        int i7 = localvc2.j();
                        if (!bool3) {
                          if (localObject7 != null)
                          {
                            if (bool3) {
                              break label1407;
                            }
                            if (localObject7.j() <= i7) {
                              break label1405;
                            }
                          }
                        }
                        localObject7 = localvc2;
                        if (!bool3) {
                          if (localObject8 != null)
                          {
                            if (bool3) {
                              break label1443;
                            }
                            if (localObject8.j() >= i7) {
                              break label1434;
                            }
                          }
                        }
                        localObject8 = localvc2;
                      }
                    }
                  }
                }
                if (!bool3)
                {
                  if (localHashSet.add(localObject10)) {
                    localArrayList1.add(localObject10);
                  }
                  localv1 = localv1.a();
                }
              } while (!bool2);
            } while (bool3);
            if (!bool3) {
              if ((localArrayList3.size() > 0) && (localObject9 != null))
              {
                paramn.a(localObject9, localArrayList3.toArray(new kc[localArrayList3.size()]));
                localArrayList3.clear();
              }
            }
            if (!bool3) {
              if (!((c_)localObject3).c.isEmpty()) {
                localHashMap1.put(((c_)localObject3).a, localObject3);
              }
            }
            if (!bool3)
            {
              if (i != 0)
              {
                int i1;
                if (!bool3) {
                  if (localObject7 != null)
                  {
                    i1 = (localObject7.j() + localObject8.j()) / 2;
                    if (localObject5 == null) {
                      break label1682;
                    }
                    if (!bool3) {
                      if (i1 < ((vc)localObject5).j())
                      {
                        i1 = ((vc)localObject5).j();
                        if (bool3) {
                          break label1684;
                        }
                        if (!bool2) {
                          break label1682;
                        }
                      }
                    }
                    if (bool3) {
                      break label1690;
                    }
                    if (i1 <= ((vc)localObject6).j()) {
                      break label1682;
                    }
                    i1 = ((vc)localObject6).j();
                    break label1682;
                  }
                }
                if ((bool3) || (localObject5 != null)) {
                  i1 = ((vc)localObject5).j();
                } else {
                  i1 = -1;
                }
                if (bool3) {
                  continue;
                }
                if (i1 > -1)
                {
                  localObject10 = this.g.a(i1);
                  if (bool3) {
                    break label1735;
                  }
                  if (localObject10 != null) {
                    ((d.q_)parambc.a((e)localObject4)).a((vc)localObject10);
                  }
                }
              }
              m--;
              if (bool3) {
                break label1759;
              }
            }
          } while (!bool2);
        }
        localHashMap3.clear();
        localArrayList2.clear();
        localObject2 = localvb2.c().f();
        do
        {
          if (localObject2 == null) {
            break label1959;
          }
          e locale2 = (e)((v)localObject2).c();
          if (bool2) {
            break label321;
          }
          localObject3 = locale2.i();
          do
          {
            if (localObject3 == null) {
              break label1942;
            }
            if (bool2) {
              break;
            }
            if (parambc.a(((a.c.d)localObject3).e()).h() < localvb2.e())
            {
              localObject4 = parambc.a((a.c.d)localObject3).i();
              if (bool3) {
                continue;
              }
              if (localObject4 != null)
              {
                localc_1 = (c_)localHashMap3.get(localObject4);
                if (!bool3) {
                  if (localc_1 == null)
                  {
                    localc_1 = new c_(localObject4);
                    localHashMap3.put(localObject4, localc_1);
                    localArrayList2.add(localc_1);
                  }
                }
                localc_1.b.add(localObject3);
              }
            }
            localObject3 = ((a.c.d)localObject3).j();
          } while (!bool2);
          localObject2 = ((v)localObject2).a();
          if (bool3) {
            break;
          }
        } while (!bool2);
      } while (bool3);
      if (!bool3)
      {
        if (localHashMap3.size() > 0)
        {
          j++;
          localObject2 = paramac.a((byte)3, j);
          int n = localArrayList2.size() - 1;
          do
          {
            if (n < 0) {
              break label3689;
            }
            localObject3 = (c_)localArrayList2.get(n);
            this.d.add(localObject3);
            localObject4 = paramrb.a((vb)localObject2, ((c_)localObject3).a);
            ((c_)localObject3).d = ((e)localObject4);
            this.f.put(localObject4, localObject3);
            localc_1 = (c_)localHashMap2.get(((c_)localObject3).a);
            if (bool2) {
              break label624;
            }
            if (localc_1 != null)
            {
              localc_1.i = ((c_)localObject3);
              ((c_)localObject3).g = localc_1;
            }
            localHashMap2.put(((c_)localObject3).a, localObject3);
            localObject5 = null;
            localObject6 = null;
            localObject7 = null;
            localObject8 = null;
            localObject9 = null;
            localArrayList4.clear();
            v localv2 = ((c_)localObject3).b.f();
            if (localv2 != null)
            {
              localArrayList6.clear();
              localArrayList3.clear();
            }
            while (bool3)
            {
              localObject10 = (a.c.d)localv2.c();
              bool1 = parambc.a((a.c.d)localObject10).k();
              locale3 = ((a.c.d)localObject10).f();
              if (bool3) {
                break label617;
              }
              if (bool2) {
                break label612;
              }
              if ((localObject9 == null) || (locale3 != ((a.c.d)localObject9).f()))
              {
                if (!bool3)
                {
                  if (localArrayList4.size() > 0)
                  {
                    if (bool3) {
                      break label2307;
                    }
                    if (localObject9 != null)
                    {
                      paramn.a(localObject9, localArrayList4.toArray(new kc[localArrayList4.size()]));
                      localArrayList4.clear();
                    }
                  }
                  localObject9 = paramrb.a((e)localObject4, locale3, (a.c.d)localObject10, false, true);
                }
                if (i != 0)
                {
                  localObject11 = parambc.a(locale3);
                  if ((bool3) || (localObject11 != null))
                  {
                    localObject12 = ((ec)localObject11).n();
                    if ((bool3) || (localObject12 != null))
                    {
                      int i6 = ((vc)localObject12).j();
                      if (!bool3) {
                        if (localObject7 != null)
                        {
                          if (bool3) {
                            break label2391;
                          }
                          if (localObject7.j() <= i6) {
                            break label2389;
                          }
                        }
                      }
                      localObject7 = localObject12;
                      if ((bool3) || ((localObject8 == null) || ((bool3) || (localObject8.j() < i6)))) {
                        localObject8 = localObject12;
                      }
                    }
                  }
                }
              }
              if (!bool3) {
                if (paramn != null)
                {
                  localObject11 = (kc[])paramsb.get(localObject10);
                  if (bool3) {
                    break label2655;
                  }
                  if (localObject11 != null)
                  {
                    if (bool3) {
                      break label2655;
                    }
                    if (localObject11.length > 0)
                    {
                      int i4 = localObject11.length - 1;
                      do
                      {
                        if (i4 < 0) {
                          break;
                        }
                        localObject13 = localObject11[i4].g();
                        if (bool2) {
                          break label3470;
                        }
                        if (!bool1)
                        {
                          if (bool3) {
                            break label2544;
                          }
                          if (((fd)localObject13).l()) {}
                        }
                        else
                        {
                          if (bool3) {
                            break label2554;
                          }
                          if (!bool1) {
                            break label2552;
                          }
                          if (bool3) {
                            break label2554;
                          }
                          if (!((fd)localObject13).j()) {
                            break label2552;
                          }
                        }
                        localArrayList4.add(localObject11[i4]);
                        if (!bool3)
                        {
                          if (bool2)
                          {
                            if (!bool3) {
                              if (!bool1)
                              {
                                if (bool3) {
                                  break label2613;
                                }
                                if (((fd)localObject13).j()) {
                                  break label2598;
                                }
                              }
                            }
                            if (!bool3) {
                              if (bool1)
                              {
                                if (bool3) {
                                  break label2633;
                                }
                                if (((fd)localObject13).l())
                                {
                                  localArrayList3.add(localObject11[i4]);
                                  if (bool3) {
                                    continue;
                                  }
                                  if (!bool2) {
                                    break label2634;
                                  }
                                }
                              }
                            }
                            localArrayList6.add(localObject11[i4]);
                          }
                          i4--;
                        }
                      } while (!bool2);
                    }
                  }
                }
              }
              localObject11 = parambc.a((a.c.d)localObject10).h();
              c_ localc_2 = null;
              Object localObject14 = localObject3;
              if (bool3) {
                break label594;
              }
              if (!bool3) {
                if (localObject11 == null)
                {
                  localObject13 = ((a.c.d)localObject10).e();
                  a.c.d locald = paramrb.a((e)localObject13, ((c_)localObject14).d, (a.c.d)localObject10, true, false);
                  ((c_)localObject14).j.put(localObject10, locald);
                  if (!bool3) {
                    if (localArrayList6.size() > 0)
                    {
                      if (!bool3) {
                        if (localArrayList3.size() > 0)
                        {
                          localArrayList3.addAll(localArrayList6);
                          paramn.a(locald, localArrayList3.toArray(new kc[localArrayList3.size()]));
                          if (!bool3) {
                            if (!bool2) {
                              break label3304;
                            }
                          }
                        }
                        else
                        {
                          paramn.a(locald, localArrayList6.toArray(new kc[localArrayList6.size()]));
                        }
                      }
                      if ((!bool3) && (!bool2)) {
                        break label3304;
                      }
                    }
                  }
                  if (!bool3)
                  {
                    if (localArrayList3.size() <= 0) {
                      break label3304;
                    }
                    if (bool3) {
                      break label2893;
                    }
                    paramn.a(locald, localArrayList3.toArray(new kc[localArrayList3.size()]));
                  }
                  if (!bool2) {
                    break label3304;
                  }
                }
              }
              localc_2 = (c_)localHashMap1.get(localObject11);
              Object localObject13 = localc_2.d;
              int i8 = parambc.a((e)localObject13).h();
              do
              {
                if (((c_)localObject14).g == null) {
                  break label3018;
                }
                if (bool2) {
                  break;
                }
                if (parambc.a(((c_)localObject14).g.d).h() <= i8) {
                  break label3018;
                }
                if (!bool3) {
                  if (((c_)localObject14).f == null) {
                    ((c_)localObject14).f = (((c_)localObject14).g.e = paramrb.a(((c_)localObject14).g.d, ((c_)localObject14).d, (a.c.d)localObject10));
                  }
                }
                localObject14 = ((c_)localObject14).g;
              } while (!bool2);
              Object localObject15 = localc_2.d.a(((c_)localObject14).d);
              if (bool3) {
                break label2069;
              }
              if ((bool3) || (localObject15 == null))
              {
                localObject15 = paramrb.a(localc_2.d, ((c_)localObject14).d, (a.c.d)localObject10);
                if (bool3) {
                  break label3275;
                }
                if (localArrayList6.size() > 0)
                {
                  paramn.a(localObject15, localArrayList6.toArray(new kc[localArrayList6.size()]));
                  if (bool3) {
                    break label3275;
                  }
                  if (!bool2) {}
                }
              }
              else
              {
                if (bool3) {
                  break label3275;
                }
                if (localArrayList6.size() > 0)
                {
                  kc[] arrayOfkc = (kc[])paramn.get(localObject15);
                  if ((bool3) || (arrayOfkc != null))
                  {
                    int i10 = arrayOfkc.length - 1;
                    do
                    {
                      if (i10 < 0) {
                        break;
                      }
                      localArrayList6.add(arrayOfkc[i10]);
                      i10--;
                      if (bool3) {
                        break label3286;
                      }
                      if (bool2) {
                        break label3276;
                      }
                    } while (!bool2);
                  }
                  if (bool3) {
                    break label1517;
                  }
                  paramn.a(localObject15, localArrayList6.toArray(new kc[localArrayList6.size()]));
                }
              }
              localc_2.j.put(localObject10, localObject15);
              ((c_)localObject14).j.put(localObject10, localObject15);
              localc_2.c.remove(localObject10);
              if (!bool3) {
                if (localc_2.c.isEmpty()) {
                  localHashMap1.remove(localObject11);
                }
              }
              if (!bool3) {
                if (i != 0)
                {
                  ec localec = parambc.a(((a.c.d)localObject10).e());
                  if ((bool3) || (localec != null))
                  {
                    localObject15 = localec.n();
                    if ((bool3) || (localObject15 != null))
                    {
                      int i9 = ((vc)localObject15).j();
                      if (!bool3) {
                        if (localObject5 != null)
                        {
                          if (bool3) {
                            break label3394;
                          }
                          if (((vc)localObject5).j() <= i9) {
                            break label3392;
                          }
                        }
                      }
                      localObject5 = localObject15;
                      if (!bool3) {
                        if (localObject6 != null)
                        {
                          if (bool3) {
                            break label3430;
                          }
                          if (((vc)localObject6).j() >= i9) {
                            break label3421;
                          }
                        }
                      }
                      localObject6 = localObject15;
                    }
                  }
                }
              }
              if (!bool3)
              {
                if (localHashSet.add(localObject10)) {
                  localArrayList1.add(localObject10);
                }
                localv2 = localv2.a();
              }
              if (!bool2) {
                break label2158;
              }
            }
            if (localArrayList4.size() > 0) {
              if (localObject9 != null)
              {
                paramn.a(localObject9, localArrayList4.toArray(new kc[localArrayList4.size()]));
                localArrayList4.clear();
              }
            }
            if (!bool3)
            {
              if (i != 0)
              {
                int i2;
                if (!bool3) {
                  if (localObject5 != null)
                  {
                    i2 = (((vc)localObject5).j() + ((vc)localObject6).j()) / 2;
                    if (localObject7 == null) {
                      break label3631;
                    }
                    if (!bool3) {
                      if (i2 < localObject7.j())
                      {
                        i2 = localObject7.j();
                        if (bool3) {
                          break label3633;
                        }
                        if (!bool2) {
                          break label3631;
                        }
                      }
                    }
                    if (bool3) {
                      break label3639;
                    }
                    if (i2 <= localObject8.j()) {
                      break label3631;
                    }
                    i2 = localObject8.j();
                    break label3631;
                  }
                }
                if ((bool3) || (localObject7 != null)) {
                  i2 = localObject7.j();
                } else {
                  i2 = -1;
                }
                if (bool3) {
                  continue;
                }
                if (i2 > -1)
                {
                  localObject10 = this.g.a(i2);
                  if (bool3) {
                    continue;
                  }
                  if (localObject10 != null) {
                    ((d.q_)parambc.a((e)localObject4)).a((vc)localObject10);
                  }
                }
              }
              n--;
            }
          } while (!bool2);
        }
        j++;
      }
    } while ((!bool3) && (!bool2));
    label467:
    label1007:
    label1009:
    label1791:
    int k = localArrayList1.size() - 1;
    label594:
    label1517:
    label2158:
    label2544:
    label2552:
    label2554:
    label3709:
    do
    {
      while (!bool2)
      {
        if (k < 0) {
          break;
        }
        paramo.f((a.c.d)localArrayList1.get(k));
        k--;
      }
    } while (bool3);
    label925:
    label1184:
    label1215:
    label1735:
    label1745:
    label1759:
    label2655:
    label3304:
    label3689:
    label3694:
    label3704:
    return;
  }
  
  private static boolean a(bc parambc, a.c.d paramd)
  {
    boolean bool = d.R;
    if (((bool) || (parambc != null)) && ((bool) || (parambc.a(paramd) != null)))
    {
      if (bool) {
        break label59;
      }
      if (parambc.a(paramd).m() != null) {}
    }
    else
    {
      return false;
    }
    label59:
    oc localoc = parambc.a(paramd).m().i();
    if (!bool) {}
    return localoc.b() == 1;
  }
  
  private static double b(bc parambc, a.c.d paramd)
  {
    boolean bool = d.R;
    if (((bool) || (parambc != null)) && ((bool) || (parambc.a(paramd) != null)))
    {
      if (bool) {
        break label59;
      }
      if (parambc.a(paramd).m() != null) {}
    }
    else
    {
      return 0.0D;
    }
    label59:
    return parambc.a(paramd).m().j();
  }
  
  public void a(o paramo, ac paramac, bc parambc, HashSet paramHashSet)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    ArrayList localArrayList = new ArrayList(50);
    v localv1 = this.c.f();
    if (localv1 != null) {}
    Object localObject1;
    v localv2;
    a.c.d locald1;
    zb localzb;
    label126:
    a.c.d locald2;
    label128:
    Object localObject2;
    label264:
    label355:
    w localw5;
    label556:
    while (bool2)
    {
      localObject1 = (c_)localv1.c();
      if (bool1) {
        break label639;
      }
      localv2 = ((c_)localObject1).b.f();
      do
      {
        if (localv2 == null) {
          break;
        }
        locald1 = (a.c.d)localv2.c();
        if (bool1) {
          break label697;
        }
        if (!paramo.j(locald1))
        {
          paramo.g(locald1);
          localzb = paramo.e(locald1);
          if (bool2) {
            break label126;
          }
          localzb.b();
          if (!bool1) {
            break label128;
          }
        }
        localzb = paramo.e(locald1);
        locald2 = ((c_)localObject1).d.b(locald1.e());
        localArrayList.clear();
        do
        {
          if (locald2 == null) {
            break;
          }
          localObject2 = paramo.e(locald2);
          if (bool2) {
            break label752;
          }
          if (bool1) {
            break label749;
          }
          if (locald2.e() == locald1.e())
          {
            localzb.a(((zb)localObject2).c());
            if (bool2) {
              break label264;
            }
            if (!bool1) {}
          }
          else
          {
            w localw1 = paramo.r(locald2);
            localArrayList.add(localw1);
            if (bool2) {
              break label264;
            }
            if (((c_)localObject1).b.size() > 1) {
              paramHashSet.add(new b_(locald1, localw1, null));
            }
          }
          int i = 0;
          do
          {
            if (i >= ((zb)localObject2).a()) {
              break;
            }
            localArrayList.add(((zb)localObject2).a(i));
            i++;
            if ((!bool2) && (bool1)) {
              break label355;
            }
          } while (!bool1);
          if (bool2) {
            break label749;
          }
          if (locald2.f() == locald1.f())
          {
            localzb.b(((zb)localObject2).d());
            if (bool2) {
              continue;
            }
            if (!bool1) {}
          }
          else
          {
            w localw2 = paramo.s(locald2);
            localArrayList.add(localw2);
            if (bool2) {
              continue;
            }
            if (((c_)localObject1).b.size() > 1) {
              paramHashSet.add(new b_(locald1, localw2, null));
            }
          }
          locald2 = a(locald2.f(), locald1);
        } while (!bool1);
        localObject2 = paramo.r(locald1);
        if (bool2) {
          break label1050;
        }
        int j = 0;
        do
        {
          do
          {
            if (j >= localArrayList.size()) {
              break;
            }
            localw5 = (w)localArrayList.get(j);
            if (bool1) {
              break label697;
            }
            if (paramHashSet.contains(new b_(locald1, localw5, null)))
            {
              if (bool2) {
                break label556;
              }
              if (localw5.b < ((w)localObject2).b)
              {
                localw5 = new w(localw5.a, ((w)localObject2).b);
                paramHashSet.add(new b_(locald1, localw5, null));
              }
            }
            if (!bool2)
            {
              if (!((w)localObject2).equals(localw5)) {
                localzb.a(localw5.a, localw5.b);
              }
              localObject2 = localw5;
              j++;
            }
          } while (!bool1);
          localv2 = localv2.a();
        } while (bool2);
      } while (!bool1);
      localv1 = localv1.a();
      if (bool2) {
        break label1266;
      }
      if (!bool1) {
        break;
      }
    }
    label639:
    localv1 = this.d.f();
    if (localv1 != null) {}
    label697:
    label737:
    label739:
    label749:
    label752:
    label1266:
    while (bool2)
    {
      localObject1 = (c_)localv1.c();
      if (bool1) {
        break label1281;
      }
      localv2 = ((c_)localObject1).b.f();
      do
      {
        if (localv2 == null) {
          break;
        }
        locald1 = (a.c.d)localv2.c();
        if (bool1) {
          break label1357;
        }
        if (!paramo.j(locald1))
        {
          paramo.g(locald1);
          localzb = paramo.e(locald1);
          if (bool2) {
            break label737;
          }
          localzb.b();
          if (!bool1) {
            break label739;
          }
        }
        localzb = paramo.e(locald1);
        do
        {
          break label772;
          locald2 = ((c_)localObject1).d.a(locald1.f());
          localArrayList.clear();
          do
          {
            if (locald2 == null) {
              break label1033;
            }
            localObject2 = paramo.e(locald2);
            if (bool1) {
              break;
            }
            if (locald2.f() == locald1.f())
            {
              localzb.b(((zb)localObject2).d());
              if (bool2) {
                break label878;
              }
              if (!bool1) {}
            }
            else
            {
              w localw3 = paramo.s(locald2);
              localArrayList.add(localw3);
              if (bool2) {
                break label877;
              }
              if (((c_)localObject1).b.size() > 1) {
                paramHashSet.add(new b_(locald1, localw3, null));
              }
            }
            int k = ((zb)localObject2).a() - 1;
            do
            {
              if (k < 0) {
                break;
              }
              localArrayList.add(((zb)localObject2).a(k));
              k--;
              if ((!bool2) && (bool1)) {
                break label962;
              }
            } while (!bool1);
            if (bool2) {
              break;
            }
            if (locald2.e() == locald1.e())
            {
              localzb.a(((zb)localObject2).c());
              if (bool2) {
                continue;
              }
              if (!bool1) {}
            }
            else
            {
              w localw4 = paramo.r(locald2);
              localArrayList.add(localw4);
              if (bool2) {
                continue;
              }
              if (((c_)localObject1).b.size() > 1) {
                paramHashSet.add(new b_(locald1, localw4, null));
              }
            }
            locald2 = b(locald2.e(), locald1);
          } while (!bool1);
        } while (bool2);
        localObject2 = (bool2) || (localzb.a() > 0) ? localzb.a(localzb.a() - 1) : paramo.r(locald1);
        int m = localArrayList.size() - 1;
        do
        {
          do
          {
            if (m < 0) {
              break label1235;
            }
            localw5 = (w)localArrayList.get(m);
            if (bool1) {
              break;
            }
            if (paramHashSet.contains(new b_(locald1, localw5, null)))
            {
              if (bool2) {
                break label1198;
              }
              if (localw5.b < ((w)localObject2).b)
              {
                localw5 = new w(localw5.a, ((w)localObject2).b);
                paramHashSet.add(new b_(locald1, localw5, null));
              }
            }
            if (!bool2)
            {
              if (!((w)localObject2).equals(localw5)) {
                localzb.a(localw5.a, localw5.b);
              }
              localObject2 = localw5;
              m--;
            }
          } while (!bool1);
          localv2 = localv2.a();
        } while (bool2);
      } while (!bool1);
      localv1 = localv1.a();
      if (bool2) {
        break label1347;
      }
      if (!bool1) {
        break;
      }
    }
    label772:
    label877:
    label878:
    localv1 = this.c.f();
    label962:
    label1235:
    do
    {
      do
      {
        if (localv1 == null) {
          break;
        }
        localObject1 = ((c_)localv1.c()).d;
        if (bool1) {
          break label1371;
        }
        if (paramo.h((e)localObject1)) {
          paramo.a((e)localObject1);
        }
        localv1 = localv1.a();
      } while (!bool1);
    } while (bool2);
    label1033:
    label1050:
    label1198:
    localv1 = this.d.f();
    label1281:
    label1347:
    label1357:
    label1371:
    do
    {
      if (localv1 == null) {
        break;
      }
      localObject1 = ((c_)localv1.c()).d;
      if (paramo.h((e)localObject1)) {
        paramo.a((e)localObject1);
      }
      localv1 = localv1.a();
    } while (!bool1);
  }
  
  private static boolean a(w paramw1, w paramw2)
  {
    boolean bool = d.R;
    if ((bool) || (Math.abs(paramw1.a - paramw2.a) < 0.001D)) {
      if (bool) {}
    }
    return paramw1.b < paramw2.b;
  }
  
  private static boolean b(w paramw1, w paramw2)
  {
    if (!d.R) {}
    return Math.abs(paramw1.b - paramw2.b) < 0.001D;
  }
  
  public void a(o paramo, bc parambc, HashSet paramHashSet)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    m localm = paramo.w();
    do
    {
      if (!localm.e()) {
        break;
      }
      a.c.d locald = localm.a();
      y localy = parambc.a(locald);
      if (!bool2)
      {
        if (!locald.g())
        {
          if (bool2) {
            continue;
          }
          if ((!a(locald, parambc)) && ((bool2) || ((localy.h() != null) || (localy.i() != null))))
          {
            if (bool2) {
              continue;
            }
            if (a(parambc, locald)) {
              a(locald, paramo, parambc, paramHashSet);
            }
          }
        }
        localm.f();
      }
    } while (!bool1);
  }
  
  private static boolean a(a.c.d paramd, bc parambc)
  {
    if (!d.R) {}
    return parambc.a(paramd.e()).h() == parambc.a(paramd.f()).h();
  }
  
  private static void a(a.c.z paramz, w paramw)
  {
    boolean bool = d.R;
    if ((bool) || ((paramz.isEmpty()) || ((bool) || (!paramz.d().equals(paramw))))) {
      paramz.add(paramw);
    }
  }
  
  private static void a(a.c.z paramz, double paramDouble1, double paramDouble2)
  {
    boolean bool = d.R;
    w localw = (w)paramz.d();
    if (((!bool) && (localw == null)) || ((bool) || ((localw.a != paramDouble1) || ((bool) || (localw.b != paramDouble2))))) {
      paramz.add(new w(paramDouble1, paramDouble2));
    }
  }
  
  private static boolean b(a.c.d paramd, bc parambc)
  {
    boolean bool = d.R;
    if (((bool) || (parambc != null)) && ((bool) || (parambc.a(paramd) != null)))
    {
      if (bool) {
        break label59;
      }
      if (parambc.a(paramd).m() != null) {}
    }
    else
    {
      return false;
    }
    label59:
    oc localoc = parambc.a(paramd).m().i();
    if (!bool) {}
    return localoc.c() == 1;
  }
  
  private static void a(a.c.d paramd, o paramo, bc parambc, HashSet paramHashSet)
  {
    boolean bool3 = d.R;
    boolean bool2 = d.Q;
    a.c.z localz1 = paramo.o(paramd);
    if (!bool3) {
      if (localz1.size() < 4) {
        return;
      }
    }
    w[] arrayOfw = (w[])localz1.toArray(new w[localz1.size()]);
    boolean bool1 = b(paramd, parambc);
    double d1 = b(parambc, paramd);
    double d2 = d1 / b;
    a.c.z localz2 = new a.c.z();
    Object localObject1 = arrayOfw[0];
    Object localObject2 = arrayOfw[1];
    int i = 2;
    label200:
    label503:
    do
    {
      if (i + 1 >= arrayOfw.length) {
        break;
      }
      w localw1 = arrayOfw[i];
      w localw2 = arrayOfw[(i + 1)];
      if ((!bool3) && (bool2)) {
        return;
      }
      if (!bool3)
      {
        if (!bool1)
        {
          if (bool3) {
            break label200;
          }
          if (!paramHashSet.contains(new b_(paramd, (w)localObject2, null)))
          {
            if (bool3) {
              break label200;
            }
            if (!paramHashSet.contains(new b_(paramd, localw1, null))) {
              break label503;
            }
          }
        }
        if (bool3) {
          break label519;
        }
      }
      if (a((w)localObject1, (w)localObject2))
      {
        if (bool3) {
          break label519;
        }
        if (b((w)localObject2, localw1))
        {
          if (bool3) {
            break label519;
          }
          if (a(localw1, localw2))
          {
            double d3 = Math.abs(((w)localObject2).a - localw1.a);
            if (!bool3) {
              if (d3 > 2.0D * d2)
              {
                a(localz2, (w)localObject1);
                a(localz2, ((w)localObject2).a, ((w)localObject2).b - d2);
                if (!bool3)
                {
                  if (((w)localObject2).a < localw1.a)
                  {
                    a(localz2, ((w)localObject2).a + d2, ((w)localObject2).b);
                    a(localz2, localw1.a - d2, localw1.b);
                    if (bool3) {
                      break label423;
                    }
                    if (!bool2) {}
                  }
                  else
                  {
                    a(localz2, ((w)localObject2).a - d2, ((w)localObject2).b);
                  }
                }
                else {
                  a(localz2, localw1.a + d2, localw1.b);
                }
                localObject1 = new w(localw1.a, localw1.b + d2);
                a(localz2, (w)localObject1);
                if (bool3) {
                  break label529;
                }
                if (!bool2) {
                  break label521;
                }
              }
            }
            double d4 = d3 / 2.0D;
            a(localz2, (w)localObject1);
            a(localz2, ((w)localObject2).a, ((w)localObject2).b - d4);
            localObject1 = new w(localw1.a, localw1.b + d4);
            a(localz2, (w)localObject1);
            if (bool3) {
              break label529;
            }
            if (!bool2) {
              break label521;
            }
          }
        }
      }
      a(localz2, (w)localObject1);
      a(localz2, (w)localObject2);
      localObject1 = localw1;
      localObject2 = localw2;
      if (!bool3)
      {
        if (i + 3 >= arrayOfw.length)
        {
          a(localz2, (w)localObject1);
          a(localz2, (w)localObject2);
          if (bool3) {
            continue;
          }
          if (i + 2 < arrayOfw.length) {
            a(localz2, arrayOfw[(i + 2)]);
          }
        }
        i += 2;
      }
    } while (!bool2);
    label423:
    if (!bool3) {
      paramo.a(paramd, a(localz2));
    }
    label519:
    label521:
    label529:
    return;
  }
  
  private static a.c.z a(a.c.z paramz)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if (!bool2) {
      if (paramz.size() < 3) {
        return paramz;
      }
    }
    a.c.z localz = new a.c.z();
    a.c.y localy = paramz.h();
    Object localObject = (w)localy.j();
    localz.add(localObject);
    localy.f();
    double d1 = ((w)localObject).a();
    double d2 = ((w)localObject).b();
    if ((bool2) || (localy.e()))
    {
      localObject = (w)localy.j();
      double d3 = ((w)localObject).a();
      double d4 = ((w)localObject).b();
      localy.f();
      if (localy.e()) {}
      while (bool2)
      {
        w localw = (w)localy.j();
        double d6 = localw.a();
        double d5 = localw.b();
        double d7 = (d1 - d6) * (d4 - d5) / (d2 - d5) + d6;
        if (bool1) {
          break label255;
        }
        if (Math.abs(d7 - d3) > 0.5D)
        {
          localz.add(localObject);
          d1 = d3;
          d2 = d4;
        }
        localObject = localw;
        d3 = d6;
        d4 = d5;
        localy.f();
        if (!bool1) {
          break;
        }
      }
      label255:
      localz.add(localObject);
    }
    return localz;
  }
  
  private a.c.d a(e parame, a.c.d paramd)
  {
    boolean bool = d.R;
    if (!bool) {
      if (parame == paramd.f()) {
        return null;
      }
    }
    c_ localc_ = (c_)this.e.get(parame);
    if (!bool) {
      if (localc_ == null) {
        return null;
      }
    }
    a.c.d locald = (a.c.d)localc_.j.get(paramd);
    if (!bool) {
      if (locald == null) {
        locald = localc_.e;
      }
    }
    return locald;
  }
  
  private a.c.d b(e parame, a.c.d paramd)
  {
    boolean bool = d.R;
    if (!bool) {
      if (parame == paramd.e()) {
        return null;
      }
    }
    c_ localc_ = (c_)this.f.get(parame);
    if (!bool) {
      if (localc_ == null) {
        return null;
      }
    }
    a.c.d locald = (a.c.d)localc_.j.get(paramd);
    if (!bool) {
      if (locald == null) {
        locald = localc_.f;
      }
    }
    if (!bool) {
      if ((locald != null) && (this.e.containsKey(locald.e()))) {
        return null;
      }
    }
    return locald;
  }
  
  public void a(o paramo)
  {
    this.e = null;
    this.f = null;
    this.c = null;
    this.d = null;
  }
  
  static final class c_
  {
    public Object a;
    public a.c.z b = new a.c.z();
    public Set c = new HashSet();
    public e d;
    public a.c.d e;
    public a.c.d f;
    public c_ g;
    public c_ i;
    public Map j = new HashMap();
    
    public c_(Object paramObject)
    {
      this.a = paramObject;
    }
  }
  
  private static class b_
  {
    private final w a;
    private final a.c.d c;
    
    private b_(a.c.d paramd, w paramw)
    {
      this.c = paramd;
      this.a = paramw;
    }
    
    public boolean equals(Object paramObject)
    {
      boolean bool = d.R;
      if (!bool) {
        if (this == paramObject) {
          return true;
        }
      }
      if (paramObject != null)
      {
        if (bool) {
          break label37;
        }
        if (getClass() == paramObject.getClass()) {}
      }
      else
      {
        return false;
      }
      label37:
      b_ localb_ = (b_)paramObject;
      if (!bool)
      {
        if (this.c != null)
        {
          if (bool) {
            break label87;
          }
          if (this.c.equals(localb_.c)) {
            break label86;
          }
        }
        else
        {
          if (bool) {
            break label87;
          }
        }
      }
      else {
        if (localb_.c == null) {
          break label86;
        }
      }
      return false;
      label86:
      label87:
      if ((bool) || ((this.a == null) || (!bool))) {
        if ((!this.a.equals(localb_.a)) && ((goto 125) || (localb_.a != null))) {
          return false;
        }
      }
      return true;
    }
    
    public int hashCode()
    {
      boolean bool = d.R;
      int i = (bool) || (this.a != null) ? this.a.hashCode() : 0;
      i = 31 * i + ((bool) || (this.c != null) ? this.c.hashCode() : 0);
      return i;
    }
    
    b_(a.c.d paramd, w paramw, cd.0 param0)
    {
      this(paramd, paramw);
    }
  }
}
// INTERNAL ERROR //


/* Location:           E:\idea\

 * Qualified Name:     a.f.d.a.cd

 * JD-Core Version:    0.7.0.1

 */